<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
    <base href="<%=basePath%><%!private Object basePath;%>">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>“墨趣”书城后台管理</title>
    <meta name="description" content="这是一个公告管理页面">
    <meta name="keywords" content="index">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="icon" type="image/png" href="back/assets/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="back/assets/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI" />
    <link rel="stylesheet" href="back/assets/css/amazeui.min.css" />
    <link rel="stylesheet" href="back/assets/css/admin.css">
    <link rel="stylesheet" href="back/assets/css/app.css">
</head>

<body data-type="generalComponents">
  <div>
        <ol class="am-breadcrumb">
            <li><a href="back/right.jsp" class="am-icon-home">首页</a></li>
            <li class="am-active">订单列表</li>
        </ol>
        <div class="tpl-portlet-components">
            <div class="portlet-title">
                <div class="caption font-green bold">
                  订单列表
                </div>
            </div>
            <div class="tpl-block">
                <div class="am-g">
                    <div class="am-u-sm-12 am-u-md-6">
                        <div class="am-btn-toolbar">
                            <div class="am-btn-group am-btn-group-xs">
                                <button type="button" class="am-btn am-btn-default am-btn-success"><span class="am-icon-plus"></span>查看</button>
                                <button type="button" class="am-btn am-btn-default am-btn-danger"><span class="am-icon-trash-o"></span> 删除</button>
                            </div>
                        </div>
                    </div>

                    <div class="am-u-sm-12 am-u-md-3">
                        <div class="am-input-group am-input-group-sm">
                            <input type="text" class="am-form-field">
                            <span class="am-input-group-btn">
                                    <button class="am-btn  am-btn-default am-btn-success tpl-am-btn-success am-icon-search" id="but" type="button"></button>
                                </span>
                        </div>
                    </div>
                </div>
                <div class="am-g">
                    <div class="am-u-sm-12">
                        <form class="am-form">
                            <table class="am-table am-table-striped am-table-hover table-main">
                                <thead>
                                <tr>
                                    <th class="table-check"><input type="checkbox" class="tpl-table-fz-check"></th>
                                    <th class="table-id">ID</th>
                                    <th class="table-title">地址</th>
                                    <th class="table-author">用户</th>
                                    <th class="table-author">快递</th>
                                    <th class="table-title">下单时间</th>
                                    <th class="table-author">状态</th>
                                    <th class="table-author">备注</th>
                                    <th class="table-set">操作</th>
                                </tr>
                                </thead>
                                <tbody id="nbody">
                                  <c:forEach items="${state2list}" var="o">
                                    <tr>
                                        <td><input type="checkbox"></td>
                                        <td class="table-title">${o.id}</td>
                                        <td class="table-author"><a>${o.addressid.addressdetail}</a></td>
                                        <td class="table-author">${o.uid.uname}</td>
                                        <td class="table-author"><a>${o.shipname}</a></td>
                                        <td class="am-hide-sm-only">
                                            <fmt:formatDate value="${o.ordertime}" pattern="yyyy-MM-dd HH:mm:ss"/>
                                        </td>
                                        <td class="table-author">
                                            <%--0待付款，1已付款，2待发货，3已发货，4待确认收货，5已收货，6待评价，7已评价',--%>
                                                <c:if test="${o.state==0}">待付款</c:if>
                                                <c:if test="${o.state==1}">已付款</c:if>
                                                <c:if test="${o.state==2}">待发货</c:if>
                                                <c:if test="${o.state==3}">已发货</c:if>
                                                <c:if test="${o.state==4}">待确认收货</c:if>
                                                <c:if test="${o.state==5}">已收货</c:if>
                                                <c:if test="${o.state==6}">待评价</c:if>
                                                <c:if test="${o.state==7}">已评价</c:if>
                                        </td>
                                        <td class="table-author"><a>${o.note}</a></td>
                                        <td>
                                            <div class="am-btn-toolbar">
                                                <div class="am-btn-group am-btn-group-xs">
                                                    <button class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"><a href='/orders/send.action?id=${o.id}'> <span class="am-icon-trash-o"></span>&nbsp;发货</a></button>
                                                    <button class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"><a href=""> <span class="am-icon-archive"></span>&nbsp;查看</a></button>
                                                </div>
                                            </div>
                                        </td>
                                    </tr>
                                </c:forEach>
                                </tbody>
                            </table>
                            <div class="am-cf">

                                <div class="am-fr">
                                    <ul class="am-pagination tpl-pagination">
                                        <li class="am-disabled"><a href="#">«</a></li>
                                        <li class="am-active"><a href="#">1</a></li>
                                        <li><a href="#">2</a></li>
                                        <li><a href="#">3</a></li>
                                        <li><a href="#">4</a></li>
                                        <li><a href="#">5</a></li>
                                        <li><a href="#">»</a></li>
                                    </ul>
                                </div>
                            </div>
                            <hr>

                        </form>
                    </div>

                </div>
            </div>
            <div class="tpl-alert"></div>
        </div>
    </div>
</div>

<script src="back/assets/js/jquery.min.js"></script>
<script src="back/assets/js/amazeui.min.js"></script>
<script src="back/assets/js/app.js"></script>
<script src="back/assets/js/jquery-1.12.4.js"></script>

</body>

</html>

